Skip to content

fix(core): ensured env vars take precedence over in-code config#2409

Closed
aryamohanan wants to merge 1 commit intofix-config-precedencefrom
fix-config-order
Closed

fix(core): ensured env vars take precedence over in-code config#2409
aryamohanan wants to merge 1 commit intofix-config-precedencefrom
fix-config-order

Conversation

@aryamohanan
Copy link
Copy Markdown
Contributor

@aryamohanan aryamohanan commented Mar 16, 2026

This is the first PR addressing configuration precedence.

The goal of this change is to ensure the correct order between environment variables and in-code configuration:

env > in-code

Currently, the precedence between these two sources is mixed. This PR corrects that behavior.

Added missing logging in the configuration file when a config is set.

Scope of This PR

This PR only fixes the precedence between:

  • Environment variables
  • In-code configuration

Agent configuration precedence will be addressed in separate follow-up PRs.

@aryamohanan aryamohanan changed the title Fix config order fix(config): ensure env vars take precedence over in-code config Mar 16, 2026
@aryamohanan aryamohanan marked this pull request as ready for review March 18, 2026 07:11
@aryamohanan aryamohanan requested a review from a team as a code owner March 18, 2026 07:11
@aryamohanan aryamohanan added feature-branch Target is a feat branch and removed merge later labels Mar 18, 2026
@aryamohanan aryamohanan changed the title fix(config): ensure env vars take precedence over in-code config fix(config): ensured env vars take precedence over in-code config Mar 18, 2026
@kirrg001
Copy link
Copy Markdown
Contributor

I'd suggest to rename the commit to:

fix(core): ensured env vars take precedence over in-code config
refs xy

BREAKING CHANGES: xy

And add a TODO for the other packages e.g. collector needs an update too. See normalizeConfig.

@aryamohanan aryamohanan changed the title fix(config): ensured env vars take precedence over in-code config fix(core): ensured env vars take precedence over in-code config Mar 25, 2026
@sonarqubecloud
Copy link
Copy Markdown

@aryamohanan aryamohanan removed the feature-branch Target is a feat branch label Apr 8, 2026
@aryamohanan aryamohanan closed this Apr 8, 2026
@aryamohanan
Copy link
Copy Markdown
Contributor Author

closing this, I will reopen with refactored code.

@aryamohanan
Copy link
Copy Markdown
Contributor Author

New PR #2478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants